package main

import (
	"fmt"
)

type A struct {
	Name string
}

type B struct {
	Name string
	Map  map[int]string
}

func (b *B) SetMap() {
	b.Map[12] = "map"
	b.Name = "SetMap"
	fmt.Println("SetMap", b.Map)
}

func (b B) SetMap2() {
	b.Map[13] = "map22222"
	b.Name = "SetMap2222222"
	fmt.Println("SetMap2", b.Map)
}

type TZ int

func (tz *TZ) Increase(num int) {
	*tz += TZ(num)
}

type Test struct {
	Name string
	B
	A
}

func main() {
	test := Test{B: B{Name: "AAA"}, A: A{Name: "BBB"}, Name: "Test"}
	fmt.Println(test, test.Name)
	b := B{Name: "BBBBBBBB"}
	b.Map = make(map[int]string)
	fmt.Println("b 111", b)
	b.SetMap()
	fmt.Println("b 2222", b)
	b.SetMap2()
	fmt.Println("b 3333", b)
	// a := TZ
	var a TZ
	a.Increase(100)
	fmt.Println(a)
}
